{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1923
  Verdict: Accepted
}
uses SysUtils;
 
var
	l,r,ans,c,rr,cc,n,w,h:int64;
 
procedure swap(var a,b:int64);
var
	t:int64;
begin
t:=a;
a:=b;
b:=t;
end;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(w,h,n);
if w>h then swap(w,h);
l:=0;
r:=h*n;
ans:=r;
while r-l>1 do begin
	c:=(L+r) div 2;
	rr:=c div w;
	cc:=c div h;
	if cc*rr>=n then begin
		ans:=c;
		r:=c;
	end else l:=c;
end;
write(ans);
end.